import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 求最大值方法的重载
 * User: 15085202591
 * Date: 2022-11-01
 * Time: 21:42
 */
public class FindMax2 {
    public static int Max(int x,int y){
        return x > y ? x : y;
    }
    public static float Max(float x,float y, float z){
        float tmp = x > y ? x : y;
        if (tmp > z){
            return tmp;
        }else {
            return z;
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入2个整数：");
        int a = sc.nextInt();
        int b = sc.nextInt();
        System.out.println(Max(a,b));
        System.out.println("输入3个小数：");
        float c = sc.nextFloat();
        float d = sc.nextFloat();
        float e = sc.nextFloat();
        System.out.println(Max(c,d,e));
        sc.close();
    }
}
